#ifndef FKACTORSMODEL_H
#define FKACTORSMODEL_H

#include <QList>
#include <QStringList>
#include <QVariant>
#include <QMap>

#include "FKDataModel.h"

#include "fkdatamodels_global.h"

class FKDATAMODELSSHARED_EXPORT FKActorsModel:public FKDataModel{
    Q_OBJECT
public:
    FKActorsModel(QObject *parent = 0);
    ~FKActorsModel();
    void installNewSource(FKDataRecord* root);
    enum RecordType{UserRecord,ActorRecord};
    QModelIndex recordIndexForID(const int &id,FKActorsModel::RecordType rt=FKActorsModel::UserRecord)const;
    QModelIndex recordIndexForRow(const int &pos,FKActorsModel::RecordType rt=FKActorsModel::UserRecord)const;
    qint32 actorForUserID(const qint32 &id)const;
    QModelIndex actorIndexForUserID(const qint32 &id) const;
    QVariant data(const QModelIndex &index, int role) const;
    bool setData(const QModelIndex &index, const QVariant &value, int role);
    int rowCount(const QModelIndex &parent) const;
    int columnCount(const QModelIndex &parent) const;
    QModelIndex index(int row, int column, const QModelIndex &parent) const;
    QModelIndex parent(const QModelIndex &child) const;
private:
    void initialization();
    void installCustomIndexes(FKDataRecord *rootRecord);
    QList<QPersistentModelIndex> _userIndexes;
    QList<QPersistentModelIndex> _actorIndexes;
};

#endif // FKACTORSMODEL_H
